import request from '@/utils/request'

// /matches/list
export function getMatchesList(params) {
  return request({
    url: '/matches/list',
    method: 'get',
    params: params,
  });
}   
// /matches/create
export function createMatch(params) {
  return request({
    url: '/matches/create',
    method: 'post',
    data: params,
  });
}

// /matches/joinMatch/{id}
export function joinMatch(id) {
  return request({
    url: `/matches/joinMatch/${id}`,
    method: 'get',
  });
}

// /matches/myJoinMatch
export function myJoinMatch(params) {
  return request({
    url: '/matches/myJoinMatch',
    method: 'get',
  });
}

// /matches/getMatchById/{id}
export function getMatchById(id) {
  return request({
    url: `/matches/getMatchRecord/${id}`,
    method: 'get',
  });
} 